#include <stdio.h>
#include <unistd.h>
#include <sys/types.h>
#include <unistd.h>


int main()
{
pid_t id = getpid(); 
	while(1)
    	{
        printf("I am a process, pid: %d, ppid: %d\n", id, parent);
        sleep(1);
    	}
}




//void RunChild()
//{
//    while(1)
//    {
//        printf("I am parent, pid: %d, ppid: %d\n", getpid(), getppid());
//        sleep(1);
//    }
//}
//
//int main()
//{
////    const int num = 5;
////
////    for(int i = 0; i < num; i++)
////    {
////        pid_t id = fork();
////        if(id == 0)
////        {
////            RunChild();
////        }
////
////        sleep(1);
////    }
////
////
////    while(1)
////    {
////        sleep(1);
////        printf("I am parent, pid: %d, ppid: %d\n", getpid(), getppid());
////    }
////
//
//
//
//
//
//
//
////    printf("process is running, only me!, pid: %d\n", getpid());
////    sleep(3);
////    pid_t id = fork();
////    if(id == -1) return 1;
////    else if(id == 0)
////    {
////        // child
////        while(1)
////        {
////            printf("id: %d, I am child process, pid: %d, ppid: %d\n", id, getpid(), getppid());
////            sleep(1);
////        }
////    }
////    else
////    {
////        // parent
////        while(1)
////        {
////            printf("id: %d, I am parent process, pid: %d, ppid: %d\n", id, getpid(), getppid());
////            sleep(2);
////        }
////    }
////
//    pid_t id = getpid();
//    pid_t parent = getppid();
//    while(1)
//    {
//        printf("I am a process, pid: %d, ppid: %d\n", id, parent);
//        sleep(1);
//    }
//}
//
//
//
//
//
//
//
